#!/usr/bin/python
# -*- coding: UTF-8 -*-
# 文件名：client.py


import socket

s = socket.socket()
s.connect(('47.96.235.182',8881))  # 连接服务端
# s.connect(('127.0.0.1',8882))  # 连接服务端
while True:  #
    data = input('data:')
    s.send(data.encode())  # 发送数据
    recv = s.recv(1024).decode()
    print(recv)
    if data == 'close':
        break
s.close()